package com.ruoyi.project.drug.service.impl;

import com.ruoyi.project.drug.domain.DrugSupplier;
import com.ruoyi.project.drug.mapper.DrugSupplierMapper;
import com.ruoyi.project.drug.service.DrugSupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DrugSupplierServiceImpl implements DrugSupplierService {

    @Autowired
    private DrugSupplierMapper drugSupplierMapper;
    //查询
    @Override
    public List<DrugSupplier> selectDrugList(DrugSupplier drugSupplier) {
        return drugSupplierMapper.selectDrugList(drugSupplier);
    }

    //新增
    @Override
    public int insertSupplier(DrugSupplier drugSupplier) {
        return drugSupplierMapper.insertSupplier(drugSupplier);
    }

    //修改
    @Override
    public DrugSupplier selectSupplierById(Long id) {
        return drugSupplierMapper.selectSupplierById(id);
    }

    @Override
    public int updateSupplier(DrugSupplier drugSupplier) {
        return drugSupplierMapper.updateSupplier(drugSupplier);
    }

    //删除
    @Override
    public int deleteSupplierByIds(Long[] supplierIds) {
        return drugSupplierMapper.deleteSupplierByIds(supplierIds);
    }
}
